/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.click.app.service.impl;

import com.click.app.dao.MaterialDao;
import com.click.app.model.LabelValue;
import com.click.app.model.Material;
import com.click.app.service.MaterialManager;

import java.util.List;

/**
 *
 * @author orgale
 */
public class MaterialManagerImpl extends GenericManagerImpl<Material, Long> implements MaterialManager {
    private MaterialDao materialDao;
    
    public MaterialManagerImpl(MaterialDao materialDao) {
        super(materialDao);
        this.materialDao = materialDao;
    }

    public List<Material> findById(Long id) {
        return materialDao.findById(id);
    }

    public List<LabelValue> getMaterialLabelValue() {
        return materialDao.getAllLabelValue();
    }

    public MaterialDao getMaterialDao() {
        return materialDao;
    }

    public void setMaterialDao(MaterialDao materialDao) {
        this.materialDao = materialDao;
    }
    public List<Material> findMaterialByDistintive(List<String> names, List<String> operatorNames
                                           , List<String> values, List<String> operatorValues
                                           , List<String> joinsFields){
        return materialDao.findMaterialByDistintive( names, operatorNames
                                                   , values, operatorValues, joinsFields);
    }

}
